package sw.EngAdroid;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import android.widget.TextView;

public class BetScreenActivity extends Activity {
	
	private int numOfPlayers;
	private TextView myCounter;
	private TextView questionText;
	private sw.EngAdroid.CountDownTimer time;
	private String question;
	
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Intent main = getIntent();
        Bundle stuff = main.getExtras();
        question = "Guess a number 1 to 100";
        findPage();
        
    }
	
    @Override
    protected void onStart(){
    	super.onStart();
    }
    @Override
    protected void onResume() {
        super.onResume();
    }
    @Override
    protected void onPause() {
        super.onPause();
    }
    @Override
    protected void onStop() {
        super.onStop();
    }
    @Override
    protected void onDestroy() {
        super.onDestroy();
    }
    
    private void takeBets(){
    	
    }
    
    private void findPage(){
    	
    	Intent temp = getIntent();
        Bundle moreStuff = temp.getExtras();
        
    	numOfPlayers = moreStuff.getInt("num_players");
    	requestWindowFeature(Window.FEATURE_NO_TITLE);
		if(numOfPlayers == 3){
		//setContentView(R.layout.bet_page3);
		setContentView(R.layout.playerboard3);
		}
		else if(numOfPlayers == 4){
		//setContentView(R.layout.bet_page4);
		setContentView(R.layout.playerboard4);	
		}
		else if(numOfPlayers == 5){
		//setContentView(R.layout.bet_page5);
		setContentView(R.layout.playerboard5);
		}
		else if(numOfPlayers == 6){
		//setContentView(R.layout.bet_page6);
		setContentView(R.layout.playerboard6);
		}
		
		
	}
    
    private void startTimer(){
    	myCounter = (TextView)findViewById(R.id.Timer);
    	time = new sw.EngAdroid.CountDownTimer(30000, 1000) {
    		@Override
			public void onTick(long millisUntilFinished) {
		    	 myCounter.setText("Time Remaining: " + millisUntilFinished / 1000);
		    	}

    		@Override
			public void onFinish() {
		    	 myCounter.setText("Times up!");
		     }
		  }.start();
    }
    
    
}
